{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "4c536cdf-f7c8-4970-9d40-81ddd16899b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "e2eb78f4-7d1b-42f2-b788-270b90437dc7",
   "metadata": {},
   "outputs": [],
   "source": [
    "data_dir = '../../dataset/Data_processed_2/'\n",
    "labels = [ 'down', 'go', 'left', 'no', 'off', 'on', 'right', 'stop', 'up', 'yes']\n",
    "labels_num = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "b40130c3-d1ed-4d5f-a1a7-2f031080e3ea",
   "metadata": {},
   "outputs": [],
   "source": [
    "path = data_dir + '/' + 'down.npy'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "ede51c38-56ec-4f74-8cb4-a2711e145a5c",
   "metadata": {},
   "outputs": [],
   "source": [
    "mfcc = np.load(path)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "711c66fc-a530-44d9-919b-024972d238fc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(3817, 13, 51)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mfcc.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "7d9108d2-8086-4592-aa43-714ba5c8b22b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(13, 51)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mfcc_0 = mfcc[0]\n",
    "mfcc_0.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "c8a40b03-b298-470f-b233-e134b99cfcc2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBOR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XR3cDsaY4yq8tam3FJVdT7JzyX5vjHGwzefHL7JmORWGmMcJPmqqrozyS8k+fPH2xEnVVW9NMkDY4y3VdU3HXM7kCRfP8b4SFV9YZI3VdX7H/3NP+n5epZXzj6S5DmPun3P4X1wnD5eVc9KksP/HzjmfjhBqmo7N4PZ68YYP394tzHJsRpjPJjkLUm+NsmdVfXZJ3mdt7lVvi7Jd1TVH+bmn8G8KMmPxXjkmIwxPnL4/wO5+eTVV6dxvp4lnP1WkucfvtPOqSQvT/LGY+4J3pjklYdfvzLJLx5jL5wgh38/8ZNJ3jfG+JFHfcuY5JarqmccvmKWqjqT5Fty8+8g35Lkuw5/zHjklhhj/OAY454xxnNz83rxV8cYfzPGI8egqs5V1YXPfp3kryV5dxrn62k+hLqqvi03f4d4neQ1Y4wfPt6OOEmq6vVJvinJ05N8PMkPJfkvSX42yZ9N8sEkf2OM8dg3DYHFVdXXJ/kfSd6V//83Ff84N//uzJjklqqqr8jNP2hf5+aTuj87xvhnVfUlufnKxd1J3pHku8cYu8fXKSfN4a81/qMxxkuNR47D4bj7hcObW0n+0xjjh6vqC3LE8/U04QwAAOAkm+XXGgEAAE404QwAAGACwhkAAMAEhDMAAIAJCGcAAAATEM4AAAAmIJwBAABMQDgDAACYwP8DwnmOeuhIUmAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 1080x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(15,5))\n",
    "plt.imshow(mfcc_0, aspect='auto', origin='lower');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "6db69aa0-8d3b-40bc-a5af-4a003268a05e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-288.62064 , -364.18546 , -422.14688 , -439.53302 , -449.34573 ,\n",
       "       -433.5773  , -436.4985  , -446.4346  , -335.798   , -392.91968 ,\n",
       "       -425.5096  , -438.45505 , -417.79443 , -424.4587  , -421.01166 ,\n",
       "       -420.0679  , -419.68134 , -425.0719  , -426.88937 , -433.89658 ,\n",
       "       -439.8154  , -428.95364 , -447.12006 , -441.9874  , -442.48923 ,\n",
       "       -335.67935 , -130.72527 ,  -47.102077,  -31.412872,  -72.60984 ,\n",
       "        -85.22855 ,  -90.21945 , -103.49687 , -126.522575, -141.62595 ,\n",
       "       -169.12242 , -183.04886 , -198.73654 , -215.11052 , -231.9971  ,\n",
       "       -246.0536  , -279.84875 , -299.5434  , -307.2885  , -304.4837  ,\n",
       "       -313.18356 , -331.30948 , -366.2864  , -383.5765  , -399.73965 ,\n",
       "       -421.9208  ], dtype=float32)"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mfcc_0[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "8f9f8001-22f8-4490-9adf-af7cd4f93895",
   "metadata": {},
   "outputs": [],
   "source": [
    "mfcc_1 = []\n",
    "for index, frame in zip(range(len(mfcc_0)), mfcc_0):\n",
    "    temp = np.append(frame, index)\n",
    "    mfcc_1.append(temp)\n",
    "mfcc_1 = np.array(mfcc_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "dd99a9c0-362d-4e52-a2f3-cc66142e3631",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-288.62063599, -364.18545532, -422.1468811 , -439.53302002,\n",
       "       -449.34573364, -433.57730103, -436.49850464, -446.43460083,\n",
       "       -335.79800415, -392.91967773, -425.50961304, -438.45504761,\n",
       "       -417.79443359, -424.45870972, -421.01165771, -420.06790161,\n",
       "       -419.68133545, -425.07189941, -426.88937378, -433.89657593,\n",
       "       -439.81539917, -428.9536438 , -447.12005615, -441.98739624,\n",
       "       -442.48922729, -335.67935181, -130.7252655 ,  -47.10207748,\n",
       "        -31.41287231,  -72.60984039,  -85.22855377,  -90.2194519 ,\n",
       "       -103.49687195, -126.52257538, -141.62594604, -169.12242126,\n",
       "       -183.04885864, -198.73654175, -215.11051941, -231.99710083,\n",
       "       -246.05360413, -279.84875488, -299.543396  , -307.28851318,\n",
       "       -304.48370361, -313.18356323, -331.30947876, -366.28640747,\n",
       "       -383.57650757, -399.73965454, -421.92080688,    0.        ])"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mfcc_1[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "38fbf5d6-c047-44b6-b9ef-6ca3d4b9e3d7",
   "metadata": {},
   "outputs": [],
   "source": [
    "def process_data(mfcc, label):\n",
    "    mfcc_res = []\n",
    "    for index, frame in zip(range(len(mfcc)), mfcc):\n",
    "        temp = np.append(frame, [index,label])\n",
    "        mfcc_res.append(temp)\n",
    "    mfcc_res = np.array(mfcc_res)\n",
    "    return mfcc_res"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
